﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using NUnit.Framework;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;

namespace ClassLibrary6
{
    public abstract class Page
    {
        public IWebDriver driver;

        public void assertTextPresent(String text)
        {
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
            wait.Until((d) => { return d.PageSource.Contains(text); });

            Assert.That(driver.PageSource.Contains(text), Is.True);
        }
    }
}
